import {reqGoodsList} from "@/api";
//search模块
const state={
    goodsList:[],
};
const mutations={
     GETGOODSLIST(state,goodsList){
        state.goodsList=goodsList;
    },
};
const actions={
    async getGoodsList({commit}){
        let result=await reqGoodsList();
        if(result.code==200){
            commit('GETGOODSLIST',result.data);
            //console.log(result.data);
        }
    },
};
//仓库计算属性
const getters= {};
export default {
    state,
    mutations,
    actions,
    getters
}
